package homework;

public class Student {
	String name;
	int age;
	int studentNumber;

	/*
	 * public String showStudent() { String infor = "学生信息 :学号:" + studentNumber +
	 * ",姓名:" + name + ",年龄:" + age; return infor;
	 * 
	 * }
	 * 
	 * public static void main(String[] args) { Student student = new Student();
	 * student.name = "张三"; student.age = 18; student.studentNumber = 1000; String s
	 * = student.showStudent(); System.out.println(s); Student student2 = new
	 * Student(); student2.name = "李四"; student2.age = 19; student2.studentNumber =
	 * 1001; String s2 = student2.showStudent(); System.out.println(s2); } }
	 */

	public void showStudent() {

		System.out.println("学生信息 :学号:" + studentNumber + ",姓名:" + name + ",年龄:" + age);

	}

	public static void main(String[] args) {
		Student student = new Student();
		student.name = "张三";
		student.age = 18;
		student.studentNumber = 1000;
		student.showStudent();

		Student student2 = new Student();
		student2.name = "李四";
		student2.age = 19;
		student2.studentNumber = 1001;
		student2.showStudent();

	}
}
